// var baseurl = 'http://172.20.1.46:8089';
var baseurl = 'http://47.105.45.187:8089';
// var baseurl = 'http://192.168.1.173:8085';
var ajax = {
  get(url) {
    return fetch(baseurl + url).then(_ => _.json()).then(res => res)
  },
  post(url, body, isJson = true) {
    return fetch(baseurl + url,
      {
        method: 'POST',
        body: isJson ? JSON.stringify(body) : body
      }
    ).then(_ => _.json()).then(res => res)
  }
}